import java.util.Random;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class Main
{

	public static void main(String[] args) throws Exception
	{
		ExecutorService threadPool = Executors.newFixedThreadPool(20);
		for (int i = 0; i < 20; i++)
		{
			int n;
			n = new Random().nextInt();
			n = n % 3000000;
			if (n < 0)
			{
				n += 3000000;
			}
			n += 1000000;
			threadPool.execute(new BurnnerThread(i,n));
		}
		threadPool.shutdown();
		while (false == threadPool.isTerminated())
		{
			Thread.sleep(100);
		}
		System.out.println("Done");
	}
}

